<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML">
<html>
<head>
<base href="<%=basePath%>">

<title>部门员工列表</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<a href="javascript:history.back(-1)">返回</a>
	<c:if test="${not empty staffList }">
		<table border="1">
			<tr>
				<td>员工号</td>
				<td>姓名</td>
				<td>性别</td>
				<td>电话</td>
				<td>身份证号</td>
				<td>部门编号</td>
				<td>岗位编号</td>
				<td>入职日期</td>
				<td>用工形式</td>
			</tr>
			<c:forEach var="staff" items="${staffList}">
				<tr>
					<td>${staff.s_id}</td>
					<td>${staff.s_name}</td>
					<td>
					<c:if test="${staff.s_sex == 1}">男</c:if> 
					<c:if test="${staff.s_sex == 2}">女</c:if>
					</td>
					<td>${staff.s_phone}</td>
					<td>${staff.s_idCard}</td>
					<td>${staff.d_id}</td>
					<td>${staff.p_id}</td>
					<td>${staff.s_entrydate}</td>
					<td>
					<c:if test="${staff.s_workform == 1}">正式员工</c:if> 
					<c:if test="${staff.s_workform == 2}">临时员工</c:if></td>
				</tr>
			</c:forEach>
		</table>
	</c:if>
	<c:if test="${empty staffList}">
		<br />
		<p>该部门下无员工</p>
	</c:if>
</body>
</html>
